package com.lovo.sercive.impl;

import com.lovo.bean.CutPageBean;
import com.lovo.bean.PostBean;
import com.lovo.dao.IPostDao;
import com.lovo.dao.IUserDao;
import com.lovo.sercive.IPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

@Service
public class PostServiceImpl implements IPostService {
    @Autowired
    private IPostDao dao;

    @Override
    public CutPageBean<PostBean> findByItem(int pageNO,Integer  channelId,  String title, String writer, LocalDate startDate, LocalDate endDate) {
        return dao.findByItem(pageNO, channelId,title, writer, startDate, endDate);
    }

    @Override
    public void addPost(PostBean post) {
        dao.addPost(post);
    }

    @Override
    public PostBean findById(Integer id) {
        return dao.findById(id);
    }
}
